﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ITAP.ContourBuilder.Manipulation
{
    public enum KeyMode
    {
        Up, 
        Down, 
        Press
    }

    public struct KeyboardState : IEquatable<KeyboardState>
    {
        private KeyEventArgs keyState;

        public KeyEventArgs KeyState
        {
            get { return keyState; }
            set { keyState = value; }
        }
        private KeyMode keyMode;

        public KeyMode KeyMode
        {
            get { return keyMode; }
            set { keyMode = value; }
        }

        public KeyboardState(KeyEventArgs keyState, KeyMode mode)
        {
            this.keyState = keyState;
            this.keyMode = mode;
        }

        #region IEquatable<KeyboardState> Members

        public bool Equals(KeyboardState other)
        {
            if (this.keyMode == other.keyMode && this.keyState == other.keyState)
                return true;
            else
                return false;
        }

        #endregion
    }
}
